﻿using System;
using System.ComponentModel.Composition;

namespace Microsoft.Services.Clab.UI.Mvvmc.Composition
{
    [MetadataAttribute]
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
    public sealed class ControllerExportAttribute : ExportAttribute, IControllerExportMetadata
    {
        private readonly string logicalName;

        public ControllerExportAttribute(string logicalName)
            : base(typeof(IController))
        {
            this.logicalName = logicalName;
        }

        public string LogicalName
        {
            get { return this.logicalName; }
        }

        public bool RequireWarmup
        {
            get;
            set;
        }
    }
}
